package com.tree.backend.controller;

import com.tree.backend.common.Result;
import com.tree.backend.entity.vo.QualityAnalysisData;
import com.tree.backend.service.IPartyProductionLinkService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Results;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 党建与生产关联表，记录党建活动对生产经营的具体贡献和影响 前端控制器
 * </p>
 *
 * @author tree
 * @since 2025-10-15
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/production")
public class PartyProductionLinkController {
    private final IPartyProductionLinkService partyProductionLinkService;

    @GetMapping("/quality/analysis")
    public Result<HashMap<String, ArrayList>> qualityAnalysis(){
        return Result.success(partyProductionLinkService.qualityAnalysis());
    }

    @GetMapping("/efficiency/trend")
    public Result<HashMap<String, ArrayList>> efficiencyTrend(){
        return Result.success(partyProductionLinkService.efficiencyTrend());
    }
    @GetMapping("/link")
    public Result<HashMap<String, ArrayList>> link(){
        return Result.success(partyProductionLinkService.link());
    }

}
